@import "../../app.scss";

.questionnaire-page {
  width: 100%;
  min-height: 100vh;
  background: $background-color;

  .container {
    padding: 24px 16px;
  }

  .header {
    margin-bottom: 24px;

    .title {
      font-size: 32px;
      font-weight: 500;
      color: $text-color;
      margin-bottom: 12px;
    }

    .desc {
      font-size: 26px;
      color: $text-color-secondary;
    }
  }

  .card-list {
    .card {
      margin-bottom: 16px;
      border-radius: 12px;
      background: $card-background;
      padding: 20px;

      .card-title {
        font-size: 28px;
        font-weight: 500;
        color: $text-color;
        margin-bottom: 16px;
      }

      .card-content {
        font-size: 26px;
        color: $text-color-secondary;
        line-height: 1.6;
      }
    }
  }
}

.questionnaire {
  padding: 24px 16px;
  background-color: #101118;
  color: $text-color;
  min-height: 100vh;
  box-sizing: border-box;

  &__tabs {
    display: flex;
    justify-content: space-between;
    background-color: #1E2028;
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    position: relative;
    overflow: hidden;
  }

  &__tab {
    flex: 1;
    text-align: center;
    padding: 16px 12px;
    font-size: 28px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;

    &.active {
      color: #fff;
      font-weight: 600;
    }

    &:not(.active):active {
      background-color: rgba(255, 255, 255, 0.05);
    }
  }

  &__tab-indicator {
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 50%;
    background: $primary-color;
    border-radius: 999px;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 8px rgba($primary-color, 0.4);
    z-index: 1;
  }

  &__content {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 0;
  }

  &__content-slider {
    display: flex;
    width: 200%;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  }

  &__section-wrapper {
    width: 50%;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  &__section {
    width: 100%;
    background-color: #1E2028;
    padding: 24px 16px;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
  }

  &__section-title {
    font-size: 32px;
    font-weight: 600;
    color: $text-color;
    margin-bottom: 28px;
    border-left: 4px solid $primary-color;
    padding-left: 16px;
    display: flex;
    align-items: center;

    &::after {
      content: '';
      flex: 1;
      height: 1px;
      background: rgba(255, 255, 255, 0.1);
      margin-left: 16px;
    }
  }

  &__submit {
    margin-top: 40px;
    margin-bottom: 60px;
    padding: 0 16px;

    :global {
      .nut-button--primary {
        background: $primary-color;
        border: none;
        font-size: 32px;
        height: 90px;
        border-radius: 45px;
        font-weight: 500;
        box-shadow: 0 8px 16px rgba($primary-color, 0.3);
      }
    }
  }
}

// 全局覆盖样式确保文字颜色正确
:global {
  // 确保单选和多选的文字颜色是白色
  .nut-radio__label, .nut-checkbox__label,
  .nut-radio__label span, .nut-checkbox__label span,
  .nut-radio__label div, .nut-checkbox__label div,
  .form-field__option-text {
    color: white !important;
  }

  // 增强表单字段的可见性
  .form-field {
    input, textarea {
      color: white !important;
    }
  }

  // 确保滑块标记是白色
  .nut-range__marks-text {
    color: rgba(255, 255, 255, 0.8) !important;
  }
}
